const { defineConfig } = require('@vue/cli-service')
const Mock = require("mockjs")
const data = Mock.mock({
    "list|40":[{
      "title":"@ctitle(10,15)",
      "smallimg":"@image(50x50,@color)",
       "date":"@date"
    }]
})
let leftdata = ["前端","后端","小程序","前端","后端","小程序","前端","后端","小程序",]
module.exports = defineConfig({
  transpileDependencies: true,
  devServer:{
    onBeforeSetupMiddleware({app}){
        app.get("/midlist",(req,res)=>{
             res.send(data.list)
        })
        app.get("/letflist",(req,res)=>{
          res.send(leftdata)
        })
    }
  }
})
